package es.javamyadmin.beans;

import java.io.Serializable;
import java.util.Collection;

import es.javamyadmin.modelo.ModelFacade;
import es.javamyadmin.modelo.Usuarios;
/**
 * Bean para los usuarios de una base de datos
 * @author emilio
 *
 */
public class ListaUsuariosBean implements Serializable{
	
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 8516677057742105685L;
	private String user = new String();
	private String pass = new String();
	private String host = new String();
	private String port = new String();
	private String clausulaWhere = new String();
	
	/**
	 * Constructor
	 */
	public ListaUsuariosBean() {
		super();
		// TODO Auto-generated constructor stub
	}

	/**
	 * @return the user
	 */
	public String getUser() {
		return user;
	}

	/**
	 * @param user the user to set
	 */
	public void setUser(String user) {
		this.user = user;
	}

	/**
	 * @return the pass
	 */
	public String getPass() {
		return pass;
	}

	/**
	 * @param pass the pass to set
	 */
	public void setPass(String pass) {
		this.pass = pass;
	}

	/**
	 * @return the host
	 */
	public String getHost() {
		return host;
	}

	/**
	 * @param host the host to set
	 */
	public void setHost(String host) {
		this.host = host;
	}

	/**
	 * @return the port
	 */
	public String getPort() {
		return port;
	}

	/**
	 * @param port the port to set
	 */
	public void setPort(String port) {
		this.port = port;
	}

	/**
	 * @return the clausulaWhere
	 */
	public String getClausulaWhere() {
		return clausulaWhere;
	}

	/**
	 * @param clausulaWhere the clausulaWhere to set
	 */
	public void setClausulaWhere(String clausulaWhere) {
		this.clausulaWhere = clausulaWhere;
	}

	/**
	 * Metodo que obtiene los usuarios de una base de datos
	 * @return Collection<Usuarios>
	 */
	public Collection<Usuarios> getUsuarios(){
		
		Collection<Usuarios> usuarios = ModelFacade.getUsuarios(user, pass, host, port, clausulaWhere);
		
		return usuarios;
	}

}
